package org.dfyy.postgisdemo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dfyy.postgisdemo.pojo.Radar;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.dfyy.postgisdemo.pojo.dto.GeometryDto;
import org.dfyy.postgisdemo.pojo.dto.GeometryVo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 书山
* @description 针对表【tb_radar(雷达对象表)】的数据库操作Mapper
* @createDate 2024-04-12 13:55:44
* @Entity postgisdemo.pojo.Radar
*/
@Mapper
public interface RadarMapper extends BaseMapper<Radar> {

    /*
        INSERT
     */
    // 新增点
    boolean insertPoint(Radar radar);


    // 新增线
    boolean insertLineString(String mc,String xys);

    // 新增面
    boolean insertPolygon(String mc,String xys);


    /*
        SELECT
     */
    List<Radar> selectListRadar(@Param("str") String str);
    List<Radar> selectLineString(@Param("str") String str);
    List<Radar> selectPolygon(@Param("str") String str);

    Radar selectPoint(Radar radar);

    List<Radar> selectAllPoint();

    List<GeometryVo> queryAllLineString();
    List<GeometryVo> queryAllPolygon();


    /*
        UPDATE
     */
    // 修改点
    boolean updatePoint(Radar radar);


    // 修改线
    boolean updateLineString(GeometryDto dto);

    // 修改面
    boolean updatePolygon(GeometryDto dto);

    /*
        DELETE
     */
    // 批删
    boolean batchDeleteByIds(List<Integer> ids);


}




